//悬浮栏
$(function() { 
        var elm = $('#go');//通用代码，只需要修改此处id
        var startPos = $(elm).offset().top; 
        var this_left = $(elm).offset().left; 
        
        $.event.add(window, "scroll", function() { 
            var p = $(window).scrollTop();//距离浏览器顶高度 
            if(p>500){
            	$(elm).css('position',((p) > startPos) ? 'fixed' : 'fixed'); 
                $(elm).css('top',((p) > startPos) ? '10px' : '10px'); 
                $(elm).css('left',this_left); 
            }else{
            	$(elm).css('position',((p) > startPos) ? 'fixed' : 'static'); 
                $(elm).css('top',((p) > startPos) ? '10px' : ''); 
                $(elm).css('left',this_left); 
            }
             
        }); 
});